﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UpdateClient.Model;

namespace UpdateClient
{
    public class MainWindowModel: UpdateClient.ICommandNotify.NotifyBase
    {
		private string Version_;
		/// <summary>
		/// 版本号
		/// </summary>
		public string Version
        {
			get { return Version_; }
			set { Version_ = value;
			SetProperty(ref Version_, Version);
			}
		}
		private string FilePath_;
		/// <summary>
		/// 文件路径
		/// </summary>
		public string FilePath
        {
			get { return FilePath_; }
			set { FilePath_ = value;
				SetProperty(ref FilePath_, FilePath);
			}
		}

		private int ProgressBarValue_;
		/// <summary>
		/// 进度条
		/// </summary>
		public int ProgressBarValue
        {
			get { return ProgressBarValue_; }
			set { ProgressBarValue_ = value;
                SetProperty(ref ProgressBarValue_, ProgressBarValue);
            }
		}
		private string ProgressBarDescribe_;
		/// <summary>
		/// 进度描述
		/// </summary>
		public string ProgressBarDescribe
        {
			get { return ProgressBarDescribe_; }
			set { ProgressBarDescribe_ = value;
                SetProperty(ref ProgressBarDescribe_, ProgressBarDescribe);
            }
		}

		private List<FileModel> FileList_;
		/// <summary>
		/// 文件集合
		/// </summary>
		public List<FileModel> FileList
        {
			get { return FileList_; }
			set { FileList_ = value;
                SetProperty(ref FileList_, FileList);
            }
		}

		private Dictionary<int,string> PublicationmethodList_;

		public Dictionary<int,string> PublicationmethodList
        {
			get {
				if (PublicationmethodList_ == null)
				{
                    PublicationmethodList_= new Dictionary<int,string>();
					PublicationmethodList_.Add(1,"覆盖");
                    PublicationmethodList_.Add(2, "比较更新");
                }
				return PublicationmethodList_; }
			set { PublicationmethodList_ = value; }
		}

		private int SelectPubliType_;
		/// <summary>
		/// 发布类型
		/// </summary>
		public int SelectPubliType
        {
			get { return SelectPubliType_; }
			set { SelectPubliType_ = value; }
		}

		private string VersionNumber_;
		/// <summary>
		/// 版本号
		/// </summary>
		public string VersionNumber
        {
			get { return VersionNumber_; }
			set { VersionNumber_ = value; }
		}

		private List<FileInfo> historicalversions_;

		public List<FileInfo> historicalversions
        {
			get { return historicalversions_; }
			set { historicalversions_ = value; }
		}
		private string ReleaseDescription_;
		/// <summary>
		/// 版本发布描述内容
		/// </summary>
		public string ReleaseDescription
        {
			get { return ReleaseDescription_; }
			set { ReleaseDescription_ = value; }
		}
		private string PublishUir_;
		/// <summary>
		/// 发布地址
		/// </summary>
		public string PublishUir
        {
			get { return PublishUir_; }
			set { PublishUir_ = value;
                SetProperty(ref PublishUir_, PublishUir);
            }
		}

		private string outputinfo_;

		public string outputinfo
        {
			get { return outputinfo_; }
			set { outputinfo_ = value;
                SetProperty(ref PublishUir_, PublishUir);
            }
		}

	}
}
